#pragma once

#ifndef STRICT
#define STRICT
#endif

#ifndef WINVER
#define WINVER 0x0502
#endif

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0502
#endif						

#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0502
#endif

#ifndef _WIN32_IE
#define _WIN32_IE 0x0600
#endif

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit

#define _AFX_ALL_WARNINGS // turns off MFC's hiding of some common and often safely ignored warning messages

#ifndef _SECURE_ATL
#define _SECURE_ATL 1 //Use the Secure C Runtime in ATL
#endif

#include <afxwin.h>
#include <afxtempl.h>
#include <afxsock.h>
#include <afxmt.h>
#include <afxcmn.h>
#include <afxdlgs.h>
#include <locale.h>
#include <wincrypt.h>
#include <atlenc.h>
#include <atlfile.h>

#ifndef CPJNSMTP_NOMXLOOKUP
#include <WinDNS.h>
#endif

//Pull in the correct OpenSSL libraries
#ifndef CPJNSMTP_NOSSL
#ifdef _DEBUG
  #pragma comment(lib, "ssleay32MDd.lib")
  #pragma comment(lib, "libeay32MDd.lib")
#else
  #pragma comment(lib, "ssleay32MD.lib")
  #pragma comment(lib, "libeay32MD.lib")
#endif
#endif

//We need Crypt32 for DPAPI support in the sample app
#pragma comment(lib, "crypt32.lib")

//Pull in support for Commctrl v6
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
